package ipaintplugin.actions;

import ipaintplugin.editors.DrawingEditor;
import ipaintplugin.editors.MultiPaintEditor;
import ipaintplugin.objects.Figure;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.MouseMoveListener;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.ui.PlatformUI;

public abstract class BaseToolAction extends Action {
	
	@Override
	public void run() {
		MultiPaintEditor editor = (MultiPaintEditor) PlatformUI.getWorkbench()
				.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
		DrawingEditor deditor = (DrawingEditor) editor.getSelectedPage();
		deditor.getDocument().setAction(this);
	}
	
	public abstract Figure getFigureInstance(MouseEvent min, MouseEvent max);

}
